    		<div id="sticky_navigation" style="height:30px;border-bottom:4px solid #DFDFDF;">
        	<p class="pull-left" style="font-size:16px; line-height:30px;"><strong><?php echo $this->translate('手机端广告(Phone)') . '--' . $this->set_ad_class_name; ?></strong></p>
        	<p class="pull-right">
            <a href="<?php echo $this->url('ad/default', array('action'=>'mobileIndex')); ?>" class="btn btn-small"><i class="icon-arrow-left"></i> <?php echo $this->translate('返回广告管理'); ?></a>&nbsp;
            <a href="<?php echo $this->url('ad/default/ad-type',array('action'=>'mobileAdd', 'ad_type'=>$this->ad_type)); ?>" class="btn btn-small btn-primary"><i class="icon-plus icon-white"></i> <?php echo $this->translate('添加广告'); ?></a>&nbsp;
            <a href="<?php echo $this->myviewalias()->dbshopHelpUrl('ad_set'); ?>" target="_blank" class="btn btn-small btn-info"><i class="icon-info-sign icon-white"></i> <?php echo $this->translate('查看帮助说明'); ?></a>
            </p>
        	</div>
            <table class="table table-hover">
            <thead style="background:#CCC;">
            	<tr>
                    <th width="25%"><?php echo $this->translate('广告名称'); ?></th>
                    <th width="15%"><?php echo $this->translate('广告类型'); ?></th>
                    <th width="15%"><?php echo $this->translate('广告位置'); ?></th>
                    <th width="15%"><?php echo $this->translate('广告开始/结束时间'); ?></th>
                    <th width="8%"><?php echo $this->translate('广告状态'); ?></th>
                    <th width="7%"><?php echo $this->translate('操作'); ?></th>
                </tr>
            </thead>
            <?php
            $adTypeArray = array('image'=>$this->translate('图片'),'text'=>$this->translate('文字'),'code'=>$this->translate('代码'),'slide'=>$this->translate('幻灯片'));
			if(is_array($this->ad_list) and !empty($this->ad_list)) foreach ($this->ad_list as $ad_value) { ?>            
            <tr>
            	<td><?php echo $this->escapeHtml($ad_value['ad_name']); ?></td>
                <td><?php echo $adTypeArray[$ad_value['ad_type']]; ?></td>
                <td><?php echo $this->place[$ad_value['ad_place']]; ?></td>
                <td>
                    <?php
                    $start_time = empty($ad_value['ad_start_time']) ? '' : date("Y-m-d H:i", $ad_value['ad_start_time']);
                    $end_time   = empty($ad_value['ad_end_time']) ? '' : date("Y-m-d H:i", $ad_value['ad_end_time']);
                    if($start_time == '' and $end_time == '') {
                        $start_and_end_time = $this->translate('无限制');
                    } elseif ($end_time != '' and time() > $ad_value['ad_end_time']) {
                        $start_and_end_time = '<font color="#FF0000">' . $this->translate('已经过期') . '</font>';
                    } else {
                        $start_and_end_time = (empty($start_time) ? $this->translate('无') : $start_time) . ' / ' . (empty($end_time) ? $this->translate('无') : $end_time);
                    }

                    echo $start_and_end_time; ?>

                </td>
                <td><?php echo ($ad_value['ad_state'] == 1 ? $this->translate('启用') : $this->translate('禁用')); ?></td>
            	<td>
                <a href="<?php echo $this->url('ad/default/ad-type',array('action'=>'mobileEdit','ad_type'=>$this->ad_type,'ad_id'=>$ad_value['ad_id'])); ?>"><?php echo $this->translate('编辑'); ?></a>
                <span>|</span>
                <a href="javascript:;" onclick="ad_del_js(<?php echo $ad_value['ad_id']; ?>);"><?php echo $this->translate('删除'); ?></a>
                </td>  
            </tr>
            <?php
				}
			?>
            </table>
            
<script>
//广告删除js
function ad_del_js(ad_id) {
	if(window.confirm('<?php echo $this->translate('您确实要删除该广告吗？'); ?>')) {
	$.post("<?php echo $this->url('ad/default/ad-type',array('action'=>'mobileDelad','ad_type'=>$this->ad_type)); ?>",{ad_id:ad_id},
	function(data){
		if(data != 'false') {
			window.location.href='<?php echo $this->url('ad/default/ad-type',array('action'=>'mobileSetad','ad_type'=>$this->ad_type)); ?>';
			return true;
		} else {
			alert('<?php echo $this->translate('广告删除失败！'); ?>');
		}
	});
	}
	return false;
}
</script>